home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_shs_lantern.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
85 lines
# Jones 3D Cog Script
#
# shs_lantern.cog
# An alternative to gen_torchlight if hardcoded values are preferable.
# Indy reach animation plays dependent on value of reach. Flame is present but invisible at startup
# Best use: Rename for target level and adjust hardcoded values as required.
#
# [SXC] [RKD]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message activated
message startup
message timer
thing torch //the thing you light
thing flame nolink //flame, hidden at startup
thing player local
sound burning=gen_torch_burnin_c.wav local
vector minlite local
vector maxlite local
flex minradius=0.25 local
flex maxradius=0.4 local
flex reach=0 //0 for medium, 1 for high
flex islit=0 //set to 1 if torch lights at startup
#SUB-ROUTINES
flex lightit local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
minlite = VectorSet(0.87, 0.60, 0.06);
maxlite = VectorSet(0.89, 0.64, 0.30);
SetThingFlags(flame, 0x10);
SetThingLight(torch, VectorSet(0.0, 0.0, 0.0), 0.3, 0.01);
if (islit) call lightit;
return;
# ........................................................................................
activated:
if (islit) return;
if ((GetCurWeapon(player) != 13) && (!InEditor())) return;
Print("let there be light");
PlayMode(player, (60 + reach), 0);
Sleep(0.5); //no return, falls through to lightit
# ........................................................................................
lightit:
ClearThingFlags(flame, 0x10);
SetThingLight(flame, minlite, 0.2, 0.5);
SetThingLight(torch, '0.2, 0.2, 0.2', 0.01, 0.5);
Sleep(0.5);
PlaySoundThing(burning, torch, 1, 3, 10, 1);
islit = 1;
return;
end